import {Appbar} from "react-native-paper";
import {DrawerHeaderProps} from "@react-navigation/drawer";
import {StyleSheet} from "react-native";

export const StackHeader = (props: DrawerHeaderProps) => {
    return (
        <Appbar.Header style={style.appBar}>
            <Appbar.BackAction size={18}
                               color={`#EE7100`}
                               onPress={() => {
                                   props.navigation.goBack();
                               }}/>

            <Appbar.Content title={String(props.options.headerTitle)}
                            mode={`small`}
                            titleStyle={{
                                fontSize: 16
                            }}
                            color={`#EE7100`}/>

            <Appbar.Action icon="dots-vertical"/>
        </Appbar.Header>
    );
};

const style = StyleSheet.create({
    appBar: {
        height: 48,
        // backgroundColor: `#FFFFFF00`
    }
});